]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
network-agent: Remove "Show password" switch
authorFlorian Müllner <fmuellner@gnome.org>
Thu, 8 Sep 2011 15:53:22 +0000 (17:53 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Mon, 17 Oct 2011 13:29:32 +0000 (15:29 +0200)
While the ability to show the password can be useful at times,
the existing implementation is problematic:

  1) The use of a switch is wrong (as even noted in a code
     comment).

  2) It is inconsistent with any other password dialog (login screen,
     polkit).

In lack of a properly designed solution (for all password dialogs),
the designers agreed to remove the switch for now.

https://bugzilla.gnome.org/show_bug.cgi?id=658948

data/theme/gnome-shell.css
js/ui/networkAgent.js

index 9072212fe58f2b50ad807f3dc1c5f3311b1d44c3..b9d22cba17900a418d264831fd76edbc7a756898 100644 (file)
@@ -1925,14 +1925,6 @@ StTooltip StLabel {
     padding-bottom: 8px;
 }
 
-.network-dialog-show-password-checkbox {
-    padding-top: 5px;
-    padding-bottom: 5px;
-    font-size: 10pt;
-    color: white;
-    spacing: 10px;
-}
-
 .network-dialog-secret-table {
     spacing-rows: 15px;
 }
index f5c9524567230b7577e650bc6d260a9106559152..ac0b880f824834536b3fdaae6f72fcff8e2dda3c 100644 (file)
@@ -127,34 +127,14 @@ NetworkSecretDialog.prototype = {
             } else
                 secret.valid = true;
 
-            secretTable.add(label, { row: pos, col: 0, x_align: St.Align.START, y_align: St.Align.START });
+            secretTable.add(label, { row: pos, col: 0, x_expand: false, x_fill: true, x_align: St.Align.START, y_align: St.Align.START });
             secretTable.add(secret.entry, { row: pos, col: 1, x_expand: true, x_fill: true, y_align: St.Align.END });
             pos++;
 
-            if (secret.password) {
+            if (secret.password)
                 secret.entry.clutter_text.set_password_char('\u25cf');
-
-                // FIXME: need a real checkbox here
-                let button = new St.Button({ button_mask: St.ButtonMask.ONE,
-                                             can_focus: true });
-                let checkbox = new St.BoxLayout({ vertical: false,
-                                                  style_class: 'network-dialog-show-password-checkbox' 
-                                                });
-                let _switch = new PopupMenu.Switch(false);
-                checkbox.add(_switch.actor);
-                checkbox.add(new St.Label({ text: _("Show password") }), { expand: true });
-                button.connect('clicked', function() {
-                    _switch.toggle();
-                    if (_switch.state)
-                        secret.entry.clutter_text.set_password_char('');
-                    else
-                        secret.entry.clutter_text.set_password_char('\u25cf');
-                });
-                button.child = checkbox;
-                secretTable.add(button, { row: pos, col: 1, x_expand: true, x_fill: true, y_fill: true })
-                pos++;
-            }
         }
+
         messageBox.add(secretTable);
 
         this._okButton = { label:  _("Connect"),
@@ -404,4 +384,4 @@ NetworkAgent.prototype = {
         this._dialogs[requestId].close(global.get_current_time());
         this._dialogs[requestId].destroy();
     }
-};
\ No newline at end of file
+};